package cn.com.pc.content.domain.risk;

import cn.com.pc.content.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class KeywordRiskAutidor implements RiskAuditor {

//    @Autowired
//    private KeywordService keywordService;
    @Autowired
    private ContentService contentService;


    @Override
    public int audit(Risk risk) {
//        String content = buildContentStrin(risk);
//        TextResult filter = keywordService.filter(content, null);
//        switch (filter.getState()) {
//            case 1:
//                return 10;
//            case 2:
//            case 3:
//                return 1;
//            default:
//                return 0;
//        }
        return 0;
    }

    private String buildContentStrin(Risk risk) {
        //todo build risk content by type
        switch (risk.getContentType()){
            case Article:
            case Video:
        }
        return "";
    }
}
